import {post, postForm} from "../util/http"
import {PageQuery, PageResult} from "../model/Common";
import {JobRunningVO, ManualTriggerParam, PageQueryRunningParam} from "../model/Running";

export default {
    pageList(data: PageQuery<PageQueryRunningParam>): Promise<PageResult<JobRunningVO>> {
        return post<PageResult<JobRunningVO>>("/running/pageList", data);
    },
    manualTrigger(data: ManualTriggerParam): Promise<string> {
        return post<string>("/running/manualTrigger", data);
    },
    manualCancel(id: bigint): Promise<string> {
        return postForm<string>("/running/manualCancel", {id});
    }
}
